<template>
  <div class="flex h-full">
    <div class="card basis-1/5">
      <DictType @current-row="handleCurrentRow" />
    </div>
    <div class="basis-2"></div>
    <div class="card basis-4/5">
      <DictData :dict-type="currentRow"></DictData>
    </div>
  </div>
</template>

<script setup lang="ts">
import DictType from "@/views/system/dict/component/DictType.vue";
import DictData from "@/views/system/dict/component/DictData.vue";

import { Dict } from "@/api/interface/dict";

const currentRow = ref<Dict.IDictType>({
  id: "",
  dictCode: "",
  dictName: "",
  dictDesc: "",
  systemFlag: ""
});

const handleCurrentRow = (row: Dict.IDictType) => {
  currentRow.value = row;
};
</script>

<style scoped lang="scss">
.card {
  min-width: 280px;
}
</style>
